package com.ruoyi.restaurant.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.restaurant.mapper.ResOrderListMapper;
import com.ruoyi.restaurant.domain.ResOrderList;
import com.ruoyi.restaurant.service.IResOrderListService;

/**
 * 订单管理Service业务层处理
 * 
 * @author adnaan
 * @date 2023-12-11
 */
@Service
public class ResOrderListServiceImpl implements IResOrderListService 
{
    @Autowired
    private ResOrderListMapper resOrderListMapper;

    /**
     * 查询订单管理
     * 
     * @param id 订单管理主键
     * @return 订单管理
     */
    @Override
    public ResOrderList selectResOrderListById(Long id)
    {
        return resOrderListMapper.selectResOrderListById(id);
    }

    /**
     * 查询订单管理列表
     * 
     * @param resOrderList 订单管理
     * @return 订单管理
     */
    @Override
    public List<ResOrderList> selectResOrderListList(ResOrderList resOrderList)
    {
        return resOrderListMapper.selectResOrderListList(resOrderList);
    }

    /**
     * 新增订单管理
     * 
     * @param resOrderList 订单管理
     * @return 结果
     */
    @Override
    public int insertResOrderList(ResOrderList resOrderList)
    {
        resOrderList.setCreateTime(DateUtils.getNowDate());
        return resOrderListMapper.insertResOrderList(resOrderList);
    }

    /**
     * 修改订单管理
     * 
     * @param resOrderList 订单管理
     * @return 结果
     */
    @Override
    public int updateResOrderList(ResOrderList resOrderList)
    {
        resOrderList.setUpdateTime(DateUtils.getNowDate());
        return resOrderListMapper.updateResOrderList(resOrderList);
    }

    /**
     * 批量删除订单管理
     * 
     * @param ids 需要删除的订单管理主键
     * @return 结果
     */
    @Override
    public int deleteResOrderListByIds(Long[] ids)
    {
        return resOrderListMapper.deleteResOrderListByIds(ids);
    }

    /**
     * 删除订单管理信息
     * 
     * @param id 订单管理主键
     * @return 结果
     */
    @Override
    public int deleteResOrderListById(Long id)
    {
        return resOrderListMapper.deleteResOrderListById(id);
    }
}
